package chapter1.No1_7_停止线程.a停止不了的线程;

/**
 * *：从运行的效果来看，interrupt()方法并没有停止线程
 *
 * @author liujian
 * @version 2016/11/8 0008
 */
public class MyThreadStop extends Thread {

    @Override
    public void run() {
        for(int i = 0; i < 50000; i++) {
            System.out.println(i);
        }
    }

    public static void main(String[] args) throws InterruptedException {
        MyThreadStop m1 = new MyThreadStop();
        m1.start();
        Thread.sleep(100);
        System.out.println("xxxxxxxxxxxx");
        m1.interrupt();

    }
}
